﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace updateMain
{
   public class UpdateDll
    {
        public delegate void LoopCallbackHandler(string data, string code, string result);

        [DllImport("updateDll.dll")]
        public static extern int Check(string szUrl, LoopCallbackHandler eventHandle, string data);
        [DllImport("updateDll.dll")]
        public static extern int DownLoad(string szUrl, LoopCallbackHandler eventHandle, string data);

        //szCmd  = -wait 5
        [DllImport("updateDll.dll")]
        public static extern int Update(string szCmd, LoopCallbackHandler eventHandle, string data);

        [DllImport("updateDll.dll")]
        public static extern int Cancel(string szCmd, LoopCallbackHandler eventHandle, string data);

    }
}
